package com.IR.user.service;

import java.util.List;

import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.IR.shop.mapper.CollectsMapper;
import com.IR.shop.po.Collects;
import com.IR.shop.po.CollectsExample;

@Service
public class BCollectsBiz {
	@Resource(name="collectsmapper")
	public CollectsMapper mapper;
	private Collects collects;
	private List<Collects> list;
	public Collects getCollects() {
		return collects;
	}
	public void setCollects(Collects collects) {
		this.collects = collects;
	}
	public List<Collects> getList() {
		return list;
	}
	public void setList(List<Collects> list) {
		this.list = list;
	} 
	public List<Collects> showCollects(Long userid){
		CollectsExample example=new CollectsExample();
		CollectsExample.Criteria c=example.createCriteria();
		c.andUseridEqualTo(userid);
		return mapper.selectByExample(example);
	}
	public List<Collects> showCollect(Long userid,Long proid){
		CollectsExample example=new CollectsExample();
		CollectsExample.Criteria c=example.createCriteria();
		c.andUseridEqualTo(userid);
		c.andProidEqualTo(proid);
		return mapper.selectByExample(example);
	}
}
